home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / CHIP Haziran 2001.iso / prog / share / 17 / dings_e.exe / Compiler / Include / DX7 / dmusici.h < prev    next >
C/C++ Source or Header  |  1999-05-25  |  60KB  |  1,143 lines

  1. /************************************************************************
  2. *                                                                       *
  3. *   dmusici.h -- This module contains the API for the                   *
  4. *                DirectMusic performance layer                          *
  5. *                                                                       *
  6. *   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
  7. *                                                                       *
  8. ************************************************************************/
  9.  
  10. #ifndef _DMUSICI_
  11. #define _DMUSICI_
  12.  
  13. #include <windows.h>
  14.  
  15. #define COM_NO_WINDOWS_H
  16. #include <objbase.h>
  17.  
  18. #include <mmsystem.h>
  19. #include "dmusicc.h"
  20.  
  21. #include <pshpack8.h>
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26.  
  27. typedef WORD            TRANSITION_TYPE;
  28. typedef __int64         REFERENCE_TIME;
  29. typedef long            MUSIC_TIME;
  30.  
  31. #define DMUS_PPQ        768     /* parts per quarter note */
  32.  
  33. interface IDirectMusic;
  34. interface IDirectMusicTrack;
  35. interface IDirectMusicPerformance;
  36. interface IDirectMusicTool;
  37. interface IDirectMusicSegment;
  38. interface IDirectMusicSegmentState;
  39. interface IDirectMusicGraph;
  40. interface IDirectMusicPort;
  41. interface IDirectMusicBuffer;
  42. interface IDirectMusicInstrument;
  43. interface IDirectMusicDownloadedInstrument;
  44. interface IDirectMusicBand;
  45. interface IDirectMusicChordMap;
  46. interface IDirectMusicLoader;
  47. interface IDirectMusicObject;
  48. #ifndef __cplusplus 
  49. typedef interface IDirectMusic IDirectMusic;
  50. typedef interface IDirectMusicTrack IDirectMusicTrack;
  51. typedef interface IDirectMusicPerformance IDirectMusicPerformance;
  52. typedef interface IDirectMusicTool IDirectMusicTool;
  53. typedef interface IDirectMusicSegment IDirectMusicSegment;
  54. typedef interface IDirectMusicSegmentState IDirectMusicSegmentState;
  55. typedef interface IDirectMusicGraph IDirectMusicGraph;
  56. typedef interface IDirectMusicPort IDirectMusicPort;
  57. typedef interface IDirectMusicBuffer IDirectMusicBuffer;
  58. typedef interface IDirectMusicInstrument IDirectMusicInstrument;
  59. typedef interface IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument;
  60. typedef interface IDirectMusicBand IDirectMusicBand;
  61. typedef interface IDirectMusicChordMap IDirectMusicChordMap;
  62. typedef interface IDirectMusicObject IDirectMusicObject;
  63. typedef interface IDirectMusicLoader IDirectMusicLoader;
  64. #endif
  65.  
  66. typedef enum enumDMUS_COMMANDT_TYPES
  67. {
  68.     DMUS_COMMANDT_GROOVE            = 0,
  69.     DMUS_COMMANDT_FILL              = 1,
  70.     DMUS_COMMANDT_INTRO             = 2,
  71.     DMUS_COMMANDT_BREAK             = 3,
  72.     DMUS_COMMANDT_END               = 4,
  73.     DMUS_COMMANDT_ENDANDINTRO       = 5
  74. } DMUS_COMMANDT_TYPES;
  75.  
  76. typedef enum enumDMUS_SHAPET_TYPES
  77. {
  78.     DMUS_SHAPET_FALLING             = 0,
  79.     DMUS_SHAPET_LEVEL               = 1,
  80.     DMUS_SHAPET_LOOPABLE            = 2,
  81.     DMUS_SHAPET_LOUD                = 3,
  82.     DMUS_SHAPET_QUIET               = 4,
  83.     DMUS_SHAPET_PEAKING             = 5,
  84.     DMUS_SHAPET_RANDOM              = 6,
  85.     DMUS_SHAPET_RISING              = 7,
  86.     DMUS_SHAPET_SONG                = 8
  87. }   DMUS_SHAPET_TYPES;
  88.  
  89. typedef enum enumDMUS_COMPOSEF_FLAGS
  90. {       
  91.     DMUS_COMPOSEF_NONE              = 0,
  92.     DMUS_COMPOSEF_ALIGN             = 0x1,
  93.     DMUS_COMPOSEF_OVERLAP           = 0x2,
  94.     DMUS_COMPOSEF_IMMEDIATE         = 0x4,
  95.     DMUS_COMPOSEF_GRID              = 0x8,
  96.     DMUS_COMPOSEF_BEAT              = 0x10,
  97.     DMUS_COMPOSEF_MEASURE           = 0x20,
  98.     DMUS_COMPOSEF_AFTERPREPARETIME  = 0x40,
  99.     DMUS_COMPOSEF_MODULATE          = 0x1000,
  100.     DMUS_COMPOSEF_LONG              = 0x2000
  101. }   DMUS_COMPOSEF_FLAGS;
  102.  
  103. #define DMUS_PMSG_PART                                                                              \
  104.     DWORD               dwSize;                                                                     \
  105.     REFERENCE_TIME      rtTime;             /* real time (in 100 nanosecond increments) */          \
  106.     MUSIC_TIME          mtTime;             /* music time */                                        \
  107.     DWORD               dwFlags;            /* various bits (see DMUS_PMSG_FLAGS enumeration) */    \
  108.     DWORD               dwPChannel;         /* Performance Channel. The Performance can */          \
  109.                                             /* use this to determine the port/channel. */           \
  110.     DWORD               dwVirtualTrackID;   /* virtual track ID */                                  \
  111.     IDirectMusicTool*   pTool;              /* tool interface pointer */                            \
  112.     IDirectMusicGraph*  pGraph;             /* tool graph interface pointer */                      \
  113.     DWORD               dwType;             /* PMSG type (see DMUS_PMSGT_TYPES defines) */              \
  114.     DWORD               dwVoiceID;          /* unique voice id which allows synthesizers to */      \
  115.                                             /* identify a specific event. For DirectX 6.0, */       \
  116.                                             /* this field should always be 0. */                    \
  117.     DWORD               dwGroupID;          /* Track group id */                                 \
  118.     IUnknown*           punkUser;           /* user com pointer, auto released upon PMSG free */
  119.  
  120. /* every DMUS_PMSG is based off of this structure. The Performance needs 
  121.    to access these members consistently in every PMSG that goes through it. */
  122. typedef struct _DMUS_PMSG
  123. {
  124.     /* begin DMUS_PMSG_PART */
  125.     DMUS_PMSG_PART
  126.     /* end DMUS_PMSG_PART */
  127.  
  128. } DMUS_PMSG;
  129.  
  130. /* DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member */
  131. typedef enum enumDMUS_PMSGF_FLAGS
  132. {
  133.     DMUS_PMSGF_REFTIME          = 1,      /* if rtTime is valid */
  134.     DMUS_PMSGF_MUSICTIME        = 2,      /* if mtTime is valid */
  135.     DMUS_PMSGF_TOOL_IMMEDIATE   = 4,      /* if PMSG should be processed immediately */ 
  136.     DMUS_PMSGF_TOOL_QUEUE       = 8,      /* if PMSG should be processed a little early, at Queue time */
  137.     DMUS_PMSGF_TOOL_ATTIME      = 16,     /* if PMSG should be processed at the time stamp */
  138.     DMUS_PMSGF_TOOL_FLUSH       = 32      /* if PMSG is being flushed */
  139.     /* The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the */
  140.     /* DMUS_PMSG's dwFlags member. */
  141. } DMUS_PMSGF_FLAGS;
  142.  
  143. /* DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member */
  144. typedef enum enumDMUS_PMSGT_TYPES
  145. {
  146.     DMUS_PMSGT_MIDI             = 0,      /* MIDI short message */
  147.     DMUS_PMSGT_NOTE             = 1,      /* Interactive Music Note */
  148.     DMUS_PMSGT_SYSEX            = 2,      /* MIDI long message (system exclusive message) */
  149.     DMUS_PMSGT_NOTIFICATION     = 3,      /* Notification message */
  150.     DMUS_PMSGT_TEMPO            = 4,      /* Tempo message */
  151.     DMUS_PMSGT_CURVE            = 5,      /* Control change / pitch bend, etc. curve */
  152.     DMUS_PMSGT_TIMESIG          = 6,      /* Time signature */
  153.     DMUS_PMSGT_PATCH            = 7,      /* Patch changes */
  154.     DMUS_PMSGT_TRANSPOSE        = 8,      /* Transposition messages */
  155.     DMUS_PMSGT_CHANNEL_PRIORITY = 9,      /* Channel priority */
  156.     DMUS_PMSGT_STOP             = 10,     /* Stop message */
  157.     DMUS_PMSGT_DIRTY            = 11,     /* Tells Tools that cache GetParam() info to refresh */
  158.     DMUS_PMSGT_USER             = 255     /* User message */
  159. } DMUS_PMSGT_TYPES;
  160.  
  161. /* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API */
  162. typedef enum enumDMUS_SEGF_FLAGS
  163. {
  164.     DMUS_SEGF_REFTIME           = 64,     /* time parameter is in reference time  */
  165.     DMUS_SEGF_SECONDARY         = 128,    /* secondary segment */
  166.     DMUS_SEGF_QUEUE             = 256,    /* queue at the end of the primary segment queue (primary only) */
  167.     DMUS_SEGF_CONTROL           = 512,    /* play as a control track (secondary segments only) */
  168.     DMUS_SEGF_AFTERPREPARETIME  = 1<<10,  /* play after the prepare time (See IDirectMusicPerformance::GetPrepareTime) */
  169.     DMUS_SEGF_GRID              = 1<<11,  /* play on grid boundary */
  170.     DMUS_SEGF_BEAT              = 1<<12,  /* play on beat boundary */
  171.     DMUS_SEGF_MEASURE           = 1<<13,  /* play on measure boundary */
  172.     DMUS_SEGF_DEFAULT           = 1<<14,  /* use segment's default boundary */
  173.     DMUS_SEGF_NOINVALIDATE      = 1<<15   /* play without invalidating the currently playing segment(s) */
  174. } DMUS_SEGF_FLAGS;
  175.  
  176. /* DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can */
  177. /* also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values */
  178. /* are intentionally the same */
  179. typedef enum enumDMUS_TIME_RESOLVE_FLAGS
  180. {
  181.     DMUS_TIME_RESOLVE_AFTERPREPARETIME  = 1<<10,  /* resolve to a time after the prepare time */
  182.     DMUS_TIME_RESOLVE_GRID              = 1<<11,  /* resolve to a time on a grid boundary */
  183.     DMUS_TIME_RESOLVE_BEAT              = 1<<12,  /* resolve to a time on a beat boundary */
  184.     DMUS_TIME_RESOLVE_MEASURE           = 1<<13   /* resolve to a time on a measure boundary */
  185. } DMUS_TIME_RESOLVE_FLAGS;
  186.  
  187. /* The following flags are sent in the IDirectMusicTrack::Play() method */
  188. /* inside the dwFlags parameter */
  189. typedef enum enumDMUS_TRACKF_FLAGS
  190. {
  191.     DMUS_TRACKF_SEEK            = 1,      /* set on a seek */
  192.     DMUS_TRACKF_LOOP            = 2,      /* set on a loop (repeat) */
  193.     DMUS_TRACKF_START           = 4,      /* set on first call to Play */
  194.     DMUS_TRACKF_FLUSH           = 8,      /* set when this call is in response to a flush on the perfomance */
  195.     DMUS_TRACKF_DIRTY           = 16,     /* set when the track should consider any cached values from a previous call to GetParam to be invalidated */
  196. } DMUS_TRACKF_FLAGS;
  197.  
  198. #define DMUS_MAXSUBCHORD 8
  199.  
  200. typedef struct _DMUS_SUBCHORD
  201. {
  202.     DWORD   dwChordPattern;     /* Notes in the subchord */
  203.     DWORD   dwScalePattern;     /* Notes in the scale */
  204.     DWORD   dwInversionPoints;  /* Where inversions can occur */
  205.     DWORD   dwLevels;           /* Which levels are supported by this subchord */
  206.     BYTE    bChordRoot;         /* Root of the subchord */
  207.     BYTE    bScaleRoot;         /* Root of the scale */
  208. } DMUS_SUBCHORD;
  209.  
  210. typedef struct _DMUS_CHORD_KEY
  211. {
  212.     WCHAR           wszName[16];        /* Name of the chord */
  213.     WORD            wMeasure;           /* Measure this falls on */
  214.     BYTE            bBeat;              /* Beat this falls on */
  215.     BYTE            bSubChordCount;     /* Number of chords in the list of subchords */
  216.     DMUS_SUBCHORD   SubChordList[DMUS_MAXSUBCHORD]; /* List of sub chords */
  217.     DWORD           dwScale;            /* Scale underlying the entire chord */
  218.     BYTE            bKey;               /* Key underlying the entire chord */
  219. } DMUS_CHORD_KEY;
  220.  
  221. /* DMUS_NOTE_PMSG */
  222. typedef struct _DMUS_NOTE_PMSG
  223. {
  224.     /* begin DMUS_PMSG_PART */
  225.     DMUS_PMSG_PART
  226.     /* end DMUS_PMSG_PART */
  227.  
  228.     MUSIC_TIME mtDuration;     /* duration */
  229.     WORD    wMusicValue;       /* Description of note in chord and key. */
  230.     WORD    wMeasure;          /* Measure in which this note occurs */
  231.     short   nOffset;           /* Offset from grid at which this note occurs */
  232.     BYTE    bBeat;             /* Beat (in measure) at which this note occurs */
  233.     BYTE    bGrid;             /* Grid offset from beat at which this note occurs */
  234.     BYTE    bVelocity;         /* Note velocity */
  235.     BYTE    bFlags;            /* see DMUS_NOTE_FLAGS */
  236.     BYTE    bTimeRange;        /* Range to randomize time. */
  237.     BYTE    bDurRange;         /* Range to randomize duration. */
  238.     BYTE    bVelRange;         /* Range to randomize velocity. */
  239.     BYTE    bPlayModeFlags;    /* Play mode */
  240.     BYTE    bSubChordLevel;    /* Which subchord level this note uses.  */
  241.     BYTE    bMidiValue;        /* The MIDI note value, converted from wMusicValue */
  242.     char    cTranspose;        /* Transposition to add to midi note value after converted from wMusicValue. */
  243. } DMUS_NOTE_PMSG;
  244.  
  245. typedef enum enumDMUS_NOTEF_FLAGS
  246. {
  247.     DMUS_NOTEF_NOTEON = 1,     /* Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off */
  248. } DMUS_NOTEF_FLAGS;
  249.  
  250. /* The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue
  251.    into the appropriate bMidiValue.
  252. */
  253.  
  254. typedef enum enumDMUS_PLAYMODE_FLAGS
  255. {
  256.     DMUS_PLAYMODE_KEY_ROOT          = 1,  /* Transpose on top of the key root. */
  257.     DMUS_PLAYMODE_CHORD_ROOT        = 2,  /* Transpose on top of the chord root. */
  258.     DMUS_PLAYMODE_SCALE_INTERVALS   = 4,  /* Use scale intervals from scale pattern. */
  259.     DMUS_PLAYMODE_CHORD_INTERVALS   = 8,  /* Use chord intervals from chord pattern. */
  260.     DMUS_PLAYMODE_NONE              = 16, /* No mode. Indicates the parent part's mode should be used. */
  261. } DMUS_PLAYMODE_FLAGS;
  262.  
  263. /* The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS
  264.    in various ways:
  265. */
  266.  
  267. /* Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced
  268.    notes that should not be transposed by the chord or scale.
  269. */
  270. #define DMUS_PLAYMODE_FIXED             0  
  271. /* In fixed to key, the musicvalue is again a fixed MIDI value, but it
  272.    is transposed on top of the key root. 
  273. */
  274. #define DMUS_PLAYMODE_FIXEDTOKEY        DMUS_PLAYMODE_KEY_ROOT
  275. /* In fixed to chord, the musicvalue is also a fixed MIDI value, but it
  276.    is transposed on top of the chord root. 
  277. */
  278. #define DMUS_PLAYMODE_FIXEDTOCHORD      DMUS_PLAYMODE_CHORD_ROOT
  279. /* In Pedalpoint, the key root is used and the notes only track the intervals in
  280.    the scale. The chord root and intervals are completely ignored. This is useful
  281.    for melodic lines that play relative to the key root.
  282. */
  283. #define DMUS_PLAYMODE_PEDALPOINT        (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
  284. /* In the Melodic mode, the chord root is used but the notes only track the intervals in
  285.    the scale. The key root and chord intervals are completely ignored. This is useful
  286.    for melodic lines that play relative to the chord root. 
  287. */
  288. #define DMUS_PLAYMODE_MELODIC           (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
  289. /* Normal chord mode is the prevalent playback mode. 
  290.    The notes track the intervals in the chord, which is based on the chord root. 
  291.    If there is a scale component to the MusicValue, the additional intervals 
  292.    are pulled from the scale and added.
  293.    If the chord does not have an interval to match the chord component of
  294.    the MusicValue, the note is silent.
  295. */
  296. #define DMUS_PLAYMODE_NORMALCHORD       (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
  297. /* If it is desirable to play a note that is above the top of the chord, the
  298.    always play mode (known as "purpleized" in a former life) finds a position
  299.    for the note by using intervals from the scale. Essentially, this mode is
  300.    a combination of the Normal and Melodic playback modes, where a failure
  301.    in Normal causes a second try in Melodic mode.
  302. */
  303. #define DMUS_PLAYMODE_ALWAYSPLAY        (DMUS_PLAYMODE_MELODIC | DMUS_PLAYMODE_NORMALCHORD)
  304.  
  305. /*  Legacy names for modes... */
  306. #define DMUS_PLAYMODE_PURPLEIZED        DMUS_PLAYMODE_ALWAYSPLAY
  307. #define DMUS_PLAYMODE_SCALE_ROOT        DMUS_PLAYMODE_KEY_ROOT
  308. #define DMUS_PLAYMODE_FIXEDTOSCALE      DMUS_PLAYMODE_FIXEDTOKEY
  309.  
  310.  
  311. /* DMUS_MIDI_PMSG */
  312. typedef struct _DMUS_MIDI_PMSG
  313. {
  314.     /* begin DMUS_PMSG_PART */
  315.     DMUS_PMSG_PART
  316.     /* end DMUS_PMSG_PART */
  317.  
  318.     BYTE    bStatus;
  319.     BYTE    bByte1;
  320.     BYTE    bByte2;
  321.     BYTE    bPad[1];
  322. } DMUS_MIDI_PMSG;
  323.  
  324. /* DMUS_PATCH_PMSG */
  325. typedef struct _DMUS_PATCH_PMSG
  326. {
  327.     /* begin DMUS_PMSG_PART */
  328.     DMUS_PMSG_PART
  329.     /* end DMUS_PMSG_PART */
  330.  
  331.     BYTE    byInstrument;
  332.     BYTE    byMSB;
  333.     BYTE    byLSB;
  334.     BYTE    byPad[1];
  335. } DMUS_PATCH_PMSG;
  336.  
  337. /* DMUS_TRANSPOSE_PMSG */
  338. typedef struct _DMUS_TRANSPOSE_PMSG
  339. {
  340.     /* begin DMUS_PMSG_PART */
  341.     DMUS_PMSG_PART
  342.     /* end DMUS_PMSG_PART */
  343.  
  344.     short   nTranspose;
  345. } DMUS_TRANSPOSE_PMSG;
  346.  
  347. /* DMUS_CHANNEL_PRIORITY_PMSG */
  348. typedef struct _DMUS_CHANNEL_PRIORITY_PMSG
  349. {
  350.     /* begin DMUS_PMSG_PART */
  351.     DMUS_PMSG_PART
  352.     /* end DMUS_PMSG_PART */
  353.  
  354.     DWORD   dwChannelPriority;
  355. } DMUS_CHANNEL_PRIORITY_PMSG;
  356.  
  357. /* DMUS_TEMPO_PMSG */
  358. typedef struct _DMUS_TEMPO_PMSG
  359. {
  360.     /* begin DMUS_PMSG_PART */
  361.     DMUS_PMSG_PART
  362.     /* end DMUS_PMSG_PART */
  363.  
  364.     double  dblTempo;                       /* the tempo */
  365. } DMUS_TEMPO_PMSG;
  366.  
  367. #define DMUS_TEMPO_MAX          1000
  368. #define DMUS_TEMPO_MIN          1
  369.  
  370. #define DMUS_MASTERTEMPO_MAX    100.0f
  371. #define DMUS_MASTERTEMPO_MIN    0.01f
  372.  
  373. /* DMUS_SYSEX_PMSG */
  374. typedef struct _DMUS_SYSEX_PMSG
  375. {
  376.     /* begin DMUS_PMSG_PART */
  377.     DMUS_PMSG_PART
  378.     /* end DMUS_PMSG_PART */
  379.  
  380.     DWORD   dwLen;          /* length of the data */
  381.     BYTE    abData[1];      /* array of data, length equal to dwLen */
  382. } DMUS_SYSEX_PMSG;
  383.  
  384. /* DMUS_CURVE_PMSG */
  385. typedef struct _DMUS_CURVE_PMSG
  386. {
  387.     /* begin DMUS_PMSG_PART */
  388.     DMUS_PMSG_PART
  389.     /* end DMUS_PMSG_PART */
  390.  
  391.     MUSIC_TIME      mtDuration;      /* how long this curve lasts */
  392.     MUSIC_TIME      mtOriginalStart; /* must be set to either zero when this PMSG is created or to the original mtTime of the curve */
  393.     MUSIC_TIME      mtResetDuration; /* how long after the curve is finished to reset to the
  394.                                         reset value, nResetValue */
  395.     short           nStartValue;     /* curve's start value */
  396.     short           nEndValue;       /* curve's end value */
  397.     short           nResetValue;     /* curve's reset value, sent after mtResetDuration or
  398.                                         upon a flush or invalidation */
  399.     WORD            wMeasure;        /* Measure in which this curve occurs */
  400.     short           nOffset;         /* Offset from grid at which this curve occurs */
  401.     BYTE            bBeat;           /* Beat (in measure) at which this curve occurs */
  402.     BYTE            bGrid;           /* Grid offset from beat at which this curve occurs */
  403.     BYTE            bType;           /* type of curve */
  404.     BYTE            bCurveShape;     /* shape of curve */
  405.     BYTE            bCCData;         /* CC# if this is a control change type */
  406.     BYTE            bFlags;          /* set to 1 if the nResetValue must be sent when the 
  407.                                         time is reached or an invalidate occurs because
  408.                                         of a transition. If 0, the curve stays
  409.                                         permanently stuck at the new value. All bits besides
  410.                                         1 are reserved. */
  411.  
  412. } DMUS_CURVE_PMSG;
  413.  
  414. typedef enum enumDMUS_CURVE_FLAGS
  415. {
  416.     DMUS_CURVE_RESET = 1,           /* Set if the curve needs to be reset. */
  417. } DMUS_CURVE_FLAGS;
  418.  
  419.  
  420. #define DMUS_CURVE_RESET    1        
  421.  
  422. /* Curve shapes */
  423. enum
  424.     DMUS_CURVES_LINEAR  = 0,
  425.     DMUS_CURVES_INSTANT = 1,
  426.     DMUS_CURVES_EXP     = 2,
  427.     DMUS_CURVES_LOG     = 3,
  428.     DMUS_CURVES_SINE    = 4
  429. };
  430. /* curve types */
  431. #define DMUS_CURVET_PBCURVE      0x03
  432. #define DMUS_CURVET_CCCURVE      0x04
  433. #define DMUS_CURVET_MATCURVE     0x05
  434. #define DMUS_CURVET_PATCURVE     0x06
  435.  
  436. /* DMUS_TIMESIG_PMSG */
  437. typedef struct _DMUS_TIMESIG_PMSG
  438. {
  439.     /* begin DMUS_PMSG_PART */
  440.     DMUS_PMSG_PART
  441.     /* end DMUS_PMSG_PART */
  442.  
  443.     /* Time signatures define how many beats per measure, which note receives */
  444.     /* the beat, and the grid resolution. */
  445.     BYTE    bBeatsPerMeasure;       /* beats per measure (top of time sig) */
  446.     BYTE    bBeat;                  /* what note receives the beat (bottom of time sig.) */
  447.                                     /* we can assume that 0 means 256th note */
  448.     WORD    wGridsPerBeat;          /* grids per beat */
  449. } DMUS_TIMESIG_PMSG;
  450.  
  451. /* notification type values */
  452. /* The following correspond to GUID_NOTIFICATION_SEGMENT */
  453. #define DMUS_NOTIFICATION_SEGSTART      0
  454. #define DMUS_NOTIFICATION_SEGEND        1
  455. #define DMUS_NOTIFICATION_SEGALMOSTEND  2
  456. #define DMUS_NOTIFICATION_SEGLOOP       3
  457. #define DMUS_NOTIFICATION_SEGABORT      4
  458. /* The following correspond to GUID_NOTIFICATION_PERFORMANCE */
  459. #define DMUS_NOTIFICATION_MUSICSTARTED  0
  460. #define DMUS_NOTIFICATION_MUSICSTOPPED  1
  461. /* The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT */
  462. #define DMUS_NOTIFICATION_MEASUREBEAT   0
  463. /* The following corresponds to GUID_NOTIFICATION_CHORD */
  464. #define DMUS_NOTIFICATION_CHORD         0
  465. /* The following correspond to GUID_NOTIFICATION_COMMAND */
  466. #define DMUS_NOTIFICATION_GROOVE        0
  467. #define DMUS_NOTIFICATION_EMBELLISHMENT 1
  468.  
  469. /* DMUS_NOTIFICATION_PMSG */
  470. typedef struct _DMUS_NOTIFICATION_PMSG
  471. {
  472.     /* begin DMUS_PMSG_PART */
  473.     DMUS_PMSG_PART
  474.     /* end DMUS_PMSG_PART */
  475.  
  476.     GUID    guidNotificationType;
  477.     DWORD   dwNotificationOption;
  478.     DWORD   dwField1;
  479.     DWORD   dwField2;
  480. } DMUS_NOTIFICATION_PMSG;
  481.  
  482.  
  483. #define DMUS_MAX_NAME           64         /* Maximum object name length. */
  484. #define DMUS_MAX_CATEGORY       64         /* Maximum object category name length. */
  485. #define DMUS_MAX_FILENAME       MAX_PATH
  486.     
  487. typedef struct _DMUS_VERSION {
  488.   DWORD    dwVersionMS;
  489.   DWORD    dwVersionLS;
  490. }DMUS_VERSION, FAR *LPDMUS_VERSION;
  491.  
  492. /* Time Signature structure, used by IDirectMusicStyle */
  493. /* Also used as a parameter for GetParam() and SetParam */
  494. typedef struct _DMUS_TIMESIGNATURE
  495. {
  496.     MUSIC_TIME mtTime;
  497.     BYTE    bBeatsPerMeasure;       /* beats per measure (top of time sig) */
  498.     BYTE    bBeat;                  /* what note receives the beat (bottom of time sig.) */
  499.                                     /* we can assume that 0 means 256th note */
  500.     WORD    wGridsPerBeat;          /* grids per beat */
  501. } DMUS_TIMESIGNATURE;
  502.  
  503. /*      The DMUSOBJECTDESC structure is used to communicate everything you could */
  504. /*      possibly use to describe a DirectMusic object.  */
  505.  
  506. typedef struct _DMUS_OBJECTDESC
  507. {
  508.     DWORD          dwSize;                 /* Size of this structure. */
  509.     DWORD          dwValidData;            /* Flags indicating which fields below are valid. */
  510.     GUID           guidObject;             /* Unique ID for this object. */
  511.     GUID           guidClass;              /* GUID for the class of object. */
  512.     FILETIME       ftDate;                 /* Last edited date of object. */
  513.     DMUS_VERSION   vVersion;               /* Version. */
  514.     WCHAR          wszName[DMUS_MAX_NAME]; /* Name of object. */
  515.     WCHAR          wszCategory[DMUS_MAX_CATEGORY]; /* Category for object (optional). */
  516.     WCHAR          wszFileName[DMUS_MAX_FILENAME]; /* File path. */
  517.     LONGLONG       llMemLength;            /* Size of Memory data. */
  518.     LPBYTE         pbMemData;              /* Memory pointer for data. */
  519. } DMUS_OBJECTDESC;
  520.  
  521. typedef DMUS_OBJECTDESC *LPDMUS_OBJECTDESC;
  522.  
  523. /*      Flags for dwValidData. When set, a flag indicates that the  */
  524. /*      corresponding field in DMUSOBJECTDESC holds valid data. */
  525.  
  526. #define DMUS_OBJ_OBJECT         (1 << 0)     /* Object GUID is valid. */
  527. #define DMUS_OBJ_CLASS          (1 << 1)     /* Class GUID is valid. */
  528. #define DMUS_OBJ_NAME           (1 << 2)     /* Name is valid. */
  529. #define DMUS_OBJ_CATEGORY       (1 << 3)     /* Category is valid. */
  530. #define DMUS_OBJ_FILENAME       (1 << 4)     /* File path is valid. */
  531. #define DMUS_OBJ_FULLPATH       (1 << 5)     /* Path is full path. */
  532. #define DMUS_OBJ_URL            (1 << 6)     /* Path is URL. */
  533. #define DMUS_OBJ_VERSION        (1 << 7)     /* Version is valid. */
  534. #define DMUS_OBJ_DATE           (1 << 8)     /* Date is valid. */
  535. #define DMUS_OBJ_LOADED         (1 << 9)     /* Object is currently loaded in memory. */
  536. #define DMUS_OBJ_MEMORY         (1 << 10)    /* Object is pointed to by pbMemData. */
  537.  
  538. typedef IDirectMusicObject __RPC_FAR *LPDMUS_OBJECT;
  539. typedef IDirectMusicLoader __RPC_FAR *LPDMUS_LOADER;
  540. typedef IDirectMusicBand __RPC_FAR *LPDMUS_BAND;
  541.  
  542.  
  543. #define DMUSB_LOADED    (1 << 0)        /* Set when band has been loaded */
  544. #define DMUSB_DEFAULT   (1 << 1)        /* Set when band is default band for a style */
  545.  
  546. #undef  INTERFACE
  547. #define INTERFACE  IDirectMusicBand
  548. DECLARE_INTERFACE_(IDirectMusicBand, IUnknown)
  549. {
  550.     /* IUnknown */
  551.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  552.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  553.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  554.  
  555.     /* IDirectMusicBand */
  556.     STDMETHOD(CreateSegment)        (THIS_ IDirectMusicSegment** ppSegment) PURE;
  557.     STDMETHOD(Download)             (THIS_ IDirectMusicPerformance* pPerformance) PURE;     
  558.     STDMETHOD(Unload)               (THIS_ IDirectMusicPerformance* pPerformance) PURE;     
  559. };
  560.  
  561. #undef  INTERFACE
  562. #define INTERFACE  IDirectMusicObject
  563. DECLARE_INTERFACE_(IDirectMusicObject, IUnknown)
  564. {
  565.     /* IUnknown */
  566.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  567.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  568.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  569.  
  570.     /* IDirectMusicObject */
  571.     STDMETHOD(GetDescriptor)        (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  572.     STDMETHOD(SetDescriptor)        (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  573.     STDMETHOD(ParseDescriptor)      (THIS_ LPSTREAM pStream, 
  574.                                            LPDMUS_OBJECTDESC pDesc) PURE;
  575. };
  576.  
  577. #undef  INTERFACE
  578. #define INTERFACE  IDirectMusicLoader
  579. DECLARE_INTERFACE_(IDirectMusicLoader, IUnknown)
  580. {
  581.     /* IUnknown */
  582.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  583.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  584.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  585.  
  586.     /* IDirectMusicLoader */
  587.     STDMETHOD(GetObject)            (THIS_ LPDMUS_OBJECTDESC pDesc,
  588.                                            REFIID riid,
  589.                                            LPVOID FAR *ppv) PURE;
  590.     STDMETHOD(SetObject)            (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  591.     STDMETHOD(SetSearchDirectory)   (THIS_ REFGUID rguidClass, 
  592.                                            WCHAR *pwzPath, 
  593.                                            BOOL fClear) PURE;
  594.     STDMETHOD(ScanDirectory)        (THIS_ REFGUID rguidClass, 
  595.                                            WCHAR *pwzFileExtension, 
  596.                                            WCHAR *pwzScanFileName) PURE;
  597.     STDMETHOD(CacheObject)          (THIS_ IDirectMusicObject * pObject) PURE;
  598.     STDMETHOD(ReleaseObject)        (THIS_ IDirectMusicObject * pObject) PURE;
  599.     STDMETHOD(ClearCache)           (THIS_ REFGUID rguidClass) PURE;
  600.     STDMETHOD(EnableCache)          (THIS_ REFGUID rguidClass, 
  601.                                            BOOL fEnable) PURE;
  602.     STDMETHOD(EnumObject)           (THIS_ REFGUID rguidClass, 
  603.                                            DWORD dwIndex, 
  604.                                            LPDMUS_OBJECTDESC pDesc) PURE;
  605. };                                  
  606.  
  607. /*  Stream object supports IDirectMusicGetLoader interface to access loader while file parsing. */
  608.  
  609. #undef  INTERFACE
  610. #define INTERFACE  IDirectMusicGetLoader
  611. DECLARE_INTERFACE_(IDirectMusicGetLoader, IUnknown)
  612. {
  613.     /* IUnknown */
  614.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  615.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  616.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  617.  
  618.     /* IDirectMusicGetLoader */
  619.     STDMETHOD(GetLoader)            (THIS_ IDirectMusicLoader ** ppLoader) PURE;
  620. };
  621.  
  622. /*////////////////////////////////////////////////////////////////////
  623. // IDirectMusicSegment */
  624. #undef  INTERFACE
  625. #define INTERFACE  IDirectMusicSegment
  626. DECLARE_INTERFACE_(IDirectMusicSegment, IUnknown)
  627. {
  628.     /*  IUnknown */
  629.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  630.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  631.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  632.  
  633.     /*  IDirectMusicSegment */
  634.     STDMETHOD(GetLength)                (THIS_ MUSIC_TIME* pmtLength) PURE;
  635.     STDMETHOD(SetLength)                (THIS_ MUSIC_TIME mtLength) PURE;
  636.     STDMETHOD(GetRepeats)               (THIS_ DWORD* pdwRepeats) PURE;
  637.     STDMETHOD(SetRepeats)               (THIS_ DWORD  dwRepeats) PURE;
  638.     STDMETHOD(GetDefaultResolution)     (THIS_ DWORD* pdwResolution) PURE;
  639.     STDMETHOD(SetDefaultResolution)     (THIS_ DWORD  dwResolution) PURE;
  640.     STDMETHOD(GetTrack)                 (THIS_ REFGUID rguidType, 
  641.                                                DWORD dwGroupBits, 
  642.                                                DWORD dwIndex, 
  643.                                                IDirectMusicTrack** ppTrack) PURE;
  644.     STDMETHOD(GetTrackGroup)            (THIS_ IDirectMusicTrack* pTrack, 
  645.                                                DWORD* pdwGroupBits) PURE;
  646.     STDMETHOD(InsertTrack)              (THIS_ IDirectMusicTrack* pTrack, 
  647.                                                DWORD dwGroupBits) PURE;
  648.     STDMETHOD(RemoveTrack)              (THIS_ IDirectMusicTrack* pTrack) PURE;
  649.     STDMETHOD(InitPlay)                 (THIS_ IDirectMusicSegmentState** ppSegState, 
  650.                                                IDirectMusicPerformance* pPerformance,
  651.                                                DWORD dwFlags) PURE;
  652.     STDMETHOD(GetGraph)                 (THIS_ IDirectMusicGraph** ppGraph) PURE;
  653.     STDMETHOD(SetGraph)                 (THIS_ IDirectMusicGraph* pGraph) PURE;
  654.     STDMETHOD(AddNotificationType)      (THIS_ REFGUID rguidNotificationType) PURE;
  655.     STDMETHOD(RemoveNotificationType)   (THIS_ REFGUID rguidNotificationType) PURE;
  656.     STDMETHOD(GetParam)                 (THIS_ REFGUID rguidType, 
  657.                                                DWORD dwGroupBits, 
  658.                                                DWORD dwIndex, 
  659.                                                MUSIC_TIME mtTime, 
  660.                                                MUSIC_TIME* pmtNext, 
  661.                                                void* pParam) PURE; 
  662.     STDMETHOD(SetParam)                 (THIS_ REFGUID rguidType, 
  663.                                                DWORD dwGroupBits, 
  664.                                                DWORD dwIndex, 
  665.                                                MUSIC_TIME mtTime, 
  666.                                                void* pParam) PURE;
  667.     STDMETHOD(Clone)                    (THIS_ MUSIC_TIME mtStart, 
  668.                                                MUSIC_TIME mtEnd, 
  669.                                                IDirectMusicSegment** ppSegment) PURE;
  670.     STDMETHOD(SetStartPoint)            (THIS_ MUSIC_TIME mtStart) PURE;
  671.     STDMETHOD(GetStartPoint)            (THIS_ MUSIC_TIME* pmtStart) PURE;
  672.     STDMETHOD(SetLoopPoints)            (THIS_ MUSIC_TIME mtStart, 
  673.                                                MUSIC_TIME mtEnd) PURE;
  674.     STDMETHOD(GetLoopPoints)            (THIS_ MUSIC_TIME* pmtStart, 
  675.                                                MUSIC_TIME* pmtEnd) PURE;
  676.     STDMETHOD(SetPChannelsUsed)         (THIS_ DWORD dwNumPChannels, 
  677.                                                DWORD* paPChannels) PURE;
  678. };
  679.  
  680. /*/////////////////////////////////////////////////////////////////////
  681. // IDirectMusicSegmentState */
  682. #undef  INTERFACE
  683. #define INTERFACE  IDirectMusicSegmentState
  684. DECLARE_INTERFACE_(IDirectMusicSegmentState, IUnknown)
  685. {
  686.     /*  IUnknown */
  687.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  688.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  689.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  690.  
  691.     /*  IDirectMusicSegmentState */
  692.     STDMETHOD(GetRepeats)           (THIS_ DWORD* pdwRepeats) PURE;
  693.     STDMETHOD(GetSegment )          (THIS_ IDirectMusicSegment** ppSegment) PURE;
  694.     STDMETHOD(GetStartTime)         (THIS_ MUSIC_TIME* pmtStart) PURE;
  695.     STDMETHOD(GetSeek)              (THIS_ MUSIC_TIME* pmtSeek) PURE;
  696.     STDMETHOD(GetStartPoint)        (THIS_ MUSIC_TIME* pmtStart) PURE;
  697. };
  698.  
  699. /*////////////////////////////////////////////////////////////////////
  700. // IDirectMusicTrack */
  701. #undef  INTERFACE
  702. #define INTERFACE  IDirectMusicTrack
  703. DECLARE_INTERFACE_(IDirectMusicTrack, IUnknown)
  704. {
  705.     /*  IUnknown */
  706.     STDMETHOD(QueryInterface)         (THIS_ REFIID, LPVOID FAR *) PURE;
  707.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  708.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  709.  
  710.     /*  IDirectMusicTrack */
  711.     STDMETHOD(Init)                   (THIS_ IDirectMusicSegment* pSegment) PURE;
  712.     STDMETHOD(InitPlay)               (THIS_ IDirectMusicSegmentState* pSegmentState, 
  713.                                              IDirectMusicPerformance* pPerformance, 
  714.                                              void** ppStateData, 
  715.                                              DWORD dwVirtualTrackID,
  716.                                              DWORD dwFlags) PURE;
  717.     STDMETHOD(EndPlay)                (THIS_ void* pStateData) PURE;
  718.     STDMETHOD(Play)                   (THIS_ void* pStateData, 
  719.                                              MUSIC_TIME mtStart, 
  720.                                              MUSIC_TIME mtEnd, 
  721.                                              MUSIC_TIME mtOffset, 
  722.                                              DWORD dwFlags, 
  723.                                              IDirectMusicPerformance* pPerf, 
  724.                                              IDirectMusicSegmentState* pSegSt, 
  725.                                              DWORD dwVirtualID) PURE;
  726.     STDMETHOD(GetParam)               (THIS_ REFGUID rguidType, 
  727.                                              MUSIC_TIME mtTime, 
  728.                                              MUSIC_TIME* pmtNext, 
  729.                                              void* pParam) PURE; 
  730.     STDMETHOD(SetParam)               (THIS_ REFGUID rguidType, 
  731.                                              MUSIC_TIME mtTime, 
  732.                                              void* pParam) PURE;
  733.     STDMETHOD(IsParamSupported)       (THIS_ REFGUID rguidType) PURE;
  734.     STDMETHOD(AddNotificationType)    (THIS_ REFGUID rguidNotificationType) PURE;
  735.     STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  736.     STDMETHOD(Clone)                  (THIS_ MUSIC_TIME mtStart, 
  737.                                              MUSIC_TIME mtEnd, 
  738.                                              IDirectMusicTrack** ppTrack) PURE;
  739. };
  740.  
  741. /*////////////////////////////////////////////////////////////////////
  742. // IDirectMusicPerformance */
  743. #undef  INTERFACE
  744. #define INTERFACE  IDirectMusicPerformance
  745. DECLARE_INTERFACE_(IDirectMusicPerformance, IUnknown)
  746. {
  747.     /*  IUnknown */
  748.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  749.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  750.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  751.  
  752.     /*  IDirectMusicPerformance */
  753.     STDMETHOD(Init)                 (THIS_ IDirectMusic** ppDirectMusic,
  754.                                            LPDIRECTSOUND pDirectSound,
  755.                                            HWND hWnd) PURE;
  756.     STDMETHOD(PlaySegment)          (THIS_ IDirectMusicSegment* pSegment, 
  757.                                            DWORD dwFlags, 
  758.                                            __int64 i64StartTime, 
  759.                                            IDirectMusicSegmentState** ppSegmentState) PURE;
  760.     STDMETHOD(Stop)                 (THIS_ IDirectMusicSegment* pSegment, 
  761.                                            IDirectMusicSegmentState* pSegmentState, 
  762.                                            MUSIC_TIME mtTime, 
  763.                                            DWORD dwFlags) PURE;
  764.     STDMETHOD(GetSegmentState)      (THIS_ IDirectMusicSegmentState** ppSegmentState, 
  765.                                            MUSIC_TIME mtTime) PURE;
  766.     STDMETHOD(SetPrepareTime)       (THIS_ DWORD dwMilliSeconds) PURE;
  767.     STDMETHOD(GetPrepareTime)       (THIS_ DWORD* pdwMilliSeconds) PURE;
  768.     STDMETHOD(SetBumperLength)      (THIS_ DWORD dwMilliSeconds) PURE;
  769.     STDMETHOD(GetBumperLength)      (THIS_ DWORD* pdwMilliSeconds) PURE;
  770.     STDMETHOD(SendPMsg)             (THIS_ DMUS_PMSG* pPMSG) PURE;
  771.     STDMETHOD(MusicToReferenceTime) (THIS_ MUSIC_TIME mtTime, 
  772.                                            REFERENCE_TIME* prtTime) PURE;
  773.     STDMETHOD(ReferenceToMusicTime) (THIS_ REFERENCE_TIME rtTime, 
  774.                                            MUSIC_TIME* pmtTime) PURE;
  775.     STDMETHOD(IsPlaying)            (THIS_ IDirectMusicSegment* pSegment, 
  776.                                            IDirectMusicSegmentState* pSegState) PURE;
  777.     STDMETHOD(GetTime)              (THIS_ REFERENCE_TIME* prtNow, 
  778.                                            MUSIC_TIME* pmtNow) PURE;
  779.     STDMETHOD(AllocPMsg)            (THIS_ ULONG cb, 
  780.                                            DMUS_PMSG** ppPMSG) PURE;
  781.     STDMETHOD(FreePMsg)             (THIS_ DMUS_PMSG* pPMSG) PURE;
  782.     STDMETHOD(GetGraph)             (THIS_ IDirectMusicGraph** ppGraph) PURE;
  783.     STDMETHOD(SetGraph)             (THIS_ IDirectMusicGraph* pGraph) PURE;
  784.     STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification, 
  785.                                            REFERENCE_TIME rtMinimum) PURE;
  786.     STDMETHOD(GetNotificationPMsg)  (THIS_ DMUS_NOTIFICATION_PMSG** ppNotificationPMsg) PURE;
  787.     STDMETHOD(AddNotificationType)  (THIS_ REFGUID rguidNotificationType) PURE;
  788.     STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE;
  789.     STDMETHOD(AddPort)              (THIS_ IDirectMusicPort* pPort) PURE;
  790.     STDMETHOD(RemovePort)           (THIS_ IDirectMusicPort* pPort ) PURE;
  791.     STDMETHOD(AssignPChannelBlock)  (THIS_ DWORD dwBlockNum, 
  792.                                            IDirectMusicPort* pPort, 
  793.                                            DWORD dwGroup ) PURE;
  794.     STDMETHOD(AssignPChannel)       (THIS_ DWORD dwPChannel, 
  795.                                            IDirectMusicPort* pPort, 
  796.                                            DWORD dwGroup, 
  797.                                            DWORD dwMChannel ) PURE;
  798.     STDMETHOD(PChannelInfo)         (THIS_ DWORD dwPChannel, 
  799.                                            IDirectMusicPort** ppPort, 
  800.                                            DWORD* pdwGroup, 
  801.                                            DWORD* pdwMChannel ) PURE;
  802.     STDMETHOD(DownloadInstrument)   (THIS_ IDirectMusicInstrument* pInst, 
  803.                                            DWORD dwPChannel, 
  804.                                            IDirectMusicDownloadedInstrument** ppDownInst, 
  805.                                            DMUS_NOTERANGE* pNoteRanges, 
  806.                                            DWORD dwNumNoteRanges, 
  807.                                            IDirectMusicPort** ppPort, 
  808.                                            DWORD* pdwGroup, 
  809.                                            DWORD* pdwMChannel ) PURE;
  810.     STDMETHOD(Invalidate)           (THIS_ MUSIC_TIME mtTime, 
  811.                                            DWORD dwFlags) PURE;
  812.     STDMETHOD(GetParam)             (THIS_ REFGUID rguidType, 
  813.                                            DWORD dwGroupBits, 
  814.                                            DWORD dwIndex, 
  815.                                            MUSIC_TIME mtTime, 
  816.                                            MUSIC_TIME* pmtNext, 
  817.                                            void* pParam) PURE; 
  818.     STDMETHOD(SetParam)             (THIS_ REFGUID rguidType, 
  819.                                            DWORD dwGroupBits, 
  820.                                            DWORD dwIndex, 
  821.                                            MUSIC_TIME mtTime, 
  822.                                            void* pParam) PURE;
  823.     STDMETHOD(GetGlobalParam)       (THIS_ REFGUID rguidType, 
  824.                                            void* pParam, 
  825.                                            DWORD dwSize) PURE;
  826.     STDMETHOD(SetGlobalParam)       (THIS_ REFGUID rguidType, 
  827.                                            void* pParam, 
  828.                                            DWORD dwSize) PURE;
  829.     STDMETHOD(GetLatencyTime)       (THIS_ REFERENCE_TIME* prtTime) PURE;
  830.     STDMETHOD(GetQueueTime)         (THIS_ REFERENCE_TIME* prtTime) PURE;
  831.     STDMETHOD(AdjustTime)           (THIS_ REFERENCE_TIME rtAmount) PURE;
  832.     STDMETHOD(CloseDown)            (THIS) PURE;
  833.     STDMETHOD(GetResolvedTime)      (THIS_ REFERENCE_TIME rtTime,
  834.                                            REFERENCE_TIME* prtResolved,
  835.                                            DWORD dwTimeResolveFlags) PURE;
  836.     STDMETHOD(MIDIToMusic)          (THIS_ BYTE bMIDIValue,
  837.                                            DMUS_CHORD_KEY* pChord,
  838.                                            BYTE bPlayMode,
  839.                                            BYTE bChordLevel,
  840.                                            WORD *pwMusicValue) PURE;
  841.     STDMETHOD(MusicToMIDI)          (THIS_ WORD wMusicValue,
  842.                                            DMUS_CHORD_KEY* pChord,
  843.                                            BYTE bPlayMode,
  844.                                            BYTE bChordLevel,
  845.                                            BYTE *pbMIDIValue) PURE;
  846.     STDMETHOD(TimeToRhythm)         (THIS_ MUSIC_TIME mtTime,
  847.                                            DMUS_TIMESIGNATURE *pTimeSig,
  848.                                            WORD *pwMeasure,
  849.                                            BYTE *pbBeat,
  850.                                            BYTE *pbGrid,
  851.                                            short *pnOffset) PURE;
  852.     STDMETHOD(RhythmToTime)         (THIS_ WORD wMeasure,
  853.                                            BYTE bBeat,
  854.                                            BYTE bGrid,
  855.                                            short nOffset,
  856.                                            DMUS_TIMESIGNATURE *pTimeSig,
  857.                                            MUSIC_TIME *pmtTime) PURE;                                        
  858. };
  859.  
  860. /*////////////////////////////////////////////////////////////////////
  861. // IDirectMusicTool */
  862. #undef  INTERFACE
  863. #define INTERFACE  IDirectMusicTool
  864. DECLARE_INTERFACE_(IDirectMusicTool, IUnknown)
  865. {
  866.     /*  IUnknown */
  867.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  868.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  869.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  870.  
  871.     /*  IDirectMusicTool */
  872.     STDMETHOD(Init)                 (THIS_ IDirectMusicGraph* pGraph) PURE;
  873.     STDMETHOD(GetMsgDeliveryType)   (THIS_ DWORD* pdwDeliveryType ) PURE;
  874.     STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD* pdwNumElements ) PURE;
  875.     STDMETHOD(GetMediaTypes)        (THIS_ DWORD** padwMediaTypes, 
  876.                                            DWORD dwNumElements) PURE;
  877.     STDMETHOD(ProcessPMsg)          (THIS_ IDirectMusicPerformance* pPerf, 
  878.                                            DMUS_PMSG* pPMSG) PURE;
  879.     STDMETHOD(Flush)                (THIS_ IDirectMusicPerformance* pPerf, 
  880.                                            DMUS_PMSG* pPMSG, 
  881.                                            REFERENCE_TIME rtTime) PURE;
  882. };
  883.  
  884. /*////////////////////////////////////////////////////////////////////
  885. // IDirectMusicGraph */
  886. #undef  INTERFACE
  887. #define INTERFACE  IDirectMusicGraph
  888. DECLARE_INTERFACE_(IDirectMusicGraph, IUnknown)
  889. {
  890.     /*  IUnknown */
  891.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  892.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  893.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  894.  
  895.     /*  IDirectMusicGraph */
  896.     STDMETHOD(StampPMsg)            (THIS_ DMUS_PMSG* pPMSG) PURE;
  897.     STDMETHOD(InsertTool)           (THIS_ IDirectMusicTool* pTool, 
  898.                                            DWORD* pdwPChannels, 
  899.                                            DWORD cPChannels, 
  900.                                            LONG lIndex) PURE;
  901.     STDMETHOD(GetTool)              (THIS_ DWORD dwIndex, 
  902.                                            IDirectMusicTool** ppTool) PURE;
  903.     STDMETHOD(RemoveTool)           (THIS_ IDirectMusicTool* pTool) PURE;
  904. };
  905.  
  906. /*/////////////////////////////////////////////////////////////////////
  907. // IDirectMusicStyle */
  908. #undef  INTERFACE
  909. #define INTERFACE  IDirectMusicStyle
  910. DECLARE_INTERFACE_(IDirectMusicStyle, IUnknown)
  911. {
  912.     /*  IUnknown */
  913.     STDMETHOD(QueryInterface)         (THIS_ REFIID, LPVOID FAR *) PURE;
  914.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  915.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  916.  
  917.     /*  IDirectMusicStyle */
  918.     STDMETHOD(GetBand)                (THIS_ WCHAR* pwszName, 
  919.                                              IDirectMusicBand** ppBand) PURE;
  920.     STDMETHOD(EnumBand)               (THIS_ DWORD dwIndex, 
  921.                                              WCHAR *pwszName) PURE;
  922.     STDMETHOD(GetDefaultBand)         (THIS_ IDirectMusicBand** ppBand) PURE;
  923.     STDMETHOD(EnumMotif)              (THIS_ DWORD dwIndex, 
  924.                                              WCHAR* pwszName) PURE;
  925.     STDMETHOD(GetMotif)               (THIS_ WCHAR* pwszName, 
  926.                                              IDirectMusicSegment** ppSegment) PURE;
  927.     STDMETHOD(GetDefaultChordMap)     (THIS_ IDirectMusicChordMap** ppChordMap) PURE;
  928.     STDMETHOD(EnumChordMap)           (THIS_ DWORD dwIndex, 
  929.                                              WCHAR *pwszName) PURE;
  930.     STDMETHOD(GetChordMap)            (THIS_ WCHAR* pwszName, 
  931.                                              IDirectMusicChordMap** ppChordMap) PURE;
  932.     STDMETHOD(GetTimeSignature)       (THIS_ DMUS_TIMESIGNATURE* pTimeSig) PURE;
  933.     STDMETHOD(GetEmbellishmentLength) (THIS_ DWORD dwType, 
  934.                                              DWORD dwLevel, 
  935.                                              DWORD* pdwMin, 
  936.                                              DWORD* pdwMax) PURE;
  937.     STDMETHOD(GetTempo)               (THIS_ double* pTempo) PURE;
  938. };
  939.  
  940. /*/////////////////////////////////////////////////////////////////////
  941. // IDirectMusicChordMap */
  942. #undef  INTERFACE
  943. #define INTERFACE  IDirectMusicChordMap
  944. DECLARE_INTERFACE_(IDirectMusicChordMap, IUnknown)
  945. {
  946.     /*  IUnknown */
  947.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  948.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  949.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  950.  
  951.     /*  IDirectMusicChordMap */
  952.     STDMETHOD(GetScale)             (THIS_ DWORD* pdwScale) PURE;
  953. };
  954.  
  955. /*/////////////////////////////////////////////////////////////////////
  956. // IDirectMusicComposer */
  957. #undef  INTERFACE
  958. #define INTERFACE  IDirectMusicComposer
  959. DECLARE_INTERFACE_(IDirectMusicComposer, IUnknown)
  960. {
  961.     /*  IUnknown */
  962.     STDMETHOD(QueryInterface)               (THIS_ REFIID, LPVOID FAR *) PURE;
  963.     STDMETHOD_(ULONG,AddRef)                (THIS) PURE;
  964.     STDMETHOD_(ULONG,Release)               (THIS) PURE;
  965.  
  966.     /*  IDirectMusicComposer */
  967.     STDMETHOD(ComposeSegmentFromTemplate)   (THIS_ IDirectMusicStyle* pStyle, 
  968.                                                    IDirectMusicSegment* pTemplate, 
  969.                                                    WORD wActivity, 
  970.                                                    IDirectMusicChordMap* pChordMap, 
  971.                                                    IDirectMusicSegment** ppSegment) PURE;
  972.     STDMETHOD(ComposeSegmentFromShape)      (THIS_ IDirectMusicStyle* pStyle, 
  973.                                                    WORD wNumMeasures, 
  974.                                                    WORD wShape, 
  975.                                                    WORD wActivity, 
  976.                                                    BOOL fIntro, 
  977.                                                    BOOL fEnd, 
  978.                                                    IDirectMusicChordMap* pChordMap, 
  979.                                                    IDirectMusicSegment** ppSegment ) PURE;
  980.     STDMETHOD(ComposeTransition)            (THIS_ IDirectMusicSegment* pFromSeg, 
  981.                                                    IDirectMusicSegment* pToSeg, 
  982.                                                    MUSIC_TIME mtTime, 
  983.                                                    WORD wCommand, 
  984.                                                    DWORD dwFlags, 
  985.                                                    IDirectMusicChordMap* pChordMap, 
  986.                                                    IDirectMusicSegment** ppTransSeg) PURE;
  987.     STDMETHOD(AutoTransition)               (THIS_ IDirectMusicPerformance* pPerformance, 
  988.                                                    IDirectMusicSegment* pToSeg, 
  989.                                                    WORD wCommand, 
  990.                                                    DWORD dwFlags, 
  991.                                                    IDirectMusicChordMap* pChordMap, 
  992.                                                    IDirectMusicSegment** ppTransSeg, 
  993.                                                    IDirectMusicSegmentState** ppToSegState, 
  994.                                                    IDirectMusicSegmentState** ppTransSegState) PURE;
  995.     STDMETHOD(ComposeTemplateFromShape)     (THIS_ WORD wNumMeasures, 
  996.                                                    WORD wShape, 
  997.                                                    BOOL fIntro, 
  998.                                                    BOOL fEnd, 
  999.                                                    WORD wEndLength, 
  1000.                                                    IDirectMusicSegment** ppTemplate) PURE;
  1001.     STDMETHOD(ChangeChordMap)            (THIS_ IDirectMusicSegment* pSegment, 
  1002.                                                    BOOL fTrackScale, 
  1003.                                                    IDirectMusicChordMap* pChordMap) PURE;
  1004. };
  1005.  
  1006. /* CLSID's */
  1007. DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1008. DEFINE_GUID(CLSID_DirectMusicSegment,0xd2ac2882, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1009. DEFINE_GUID(CLSID_DirectMusicSegmentState,0xd2ac2883, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1010. DEFINE_GUID(CLSID_DirectMusicGraph,0xd2ac2884, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1011. DEFINE_GUID(CLSID_DirectMusicTempoTrack,0xd2ac2885, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1012. DEFINE_GUID(CLSID_DirectMusicSeqTrack,0xd2ac2886, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1013. DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1014. DEFINE_GUID(CLSID_DirectMusicTimeSigTrack,0xd2ac2888, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1015. DEFINE_GUID(CLSID_DirectMusicStyle,0xd2ac288a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1016. DEFINE_GUID(CLSID_DirectMusicChordTrack,0xd2ac288b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1017. DEFINE_GUID(CLSID_DirectMusicCommandTrack,0xd2ac288c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1018. DEFINE_GUID(CLSID_DirectMusicStyleTrack,0xd2ac288d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1019. DEFINE_GUID(CLSID_DirectMusicMotifTrack,0xd2ac288e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1020. DEFINE_GUID(CLSID_DirectMusicChordMap,0xd2ac288f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1021. DEFINE_GUID(CLSID_DirectMusicComposer,0xd2ac2890, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1022. DEFINE_GUID(CLSID_DirectMusicSignPostTrack,0xf17e8672, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1023. DEFINE_GUID(CLSID_DirectMusicLoader,0xd2ac2892, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1024. DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1025. DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00, 0xb6ee, 0x11d1, 0x86, 0xbe, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef);
  1026. DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1027. DEFINE_GUID(CLSID_DirectMusicMuteTrack,0xd2ac2898, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1028.  
  1029. /* Special GUID for all object types. This is used by the loader. */
  1030. DEFINE_GUID(GUID_DirectMusicAllTypes,0xd2ac2893, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1031.  
  1032. /* Notification guids */
  1033. DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1034. DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,0x81f75bc5, 0x4e5d, 0x11d2, 0xbc, 0xc7, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1035. DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,0xd2ac289a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1036. DEFINE_GUID(GUID_NOTIFICATION_CHORD,0xd2ac289b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1037. DEFINE_GUID(GUID_NOTIFICATION_COMMAND,0xd2ac289c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1038.  
  1039. /* Track param type guids */
  1040. /* Use to get/set a DMUS_COMMAND_PARAM param in the Command track */
  1041. DEFINE_GUID(GUID_CommandParam,0xd2ac289d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1042.  
  1043. /* Use to get a DMUS_COMMAND_PARAM_2 param in the Command track */
  1044. DEFINE_GUID(GUID_CommandParam2, 0x28f97ef7, 0x9538, 0x11d2, 0x97, 0xa9, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1045.  
  1046. /* Use to get/set a DMUS_CHORD_PARAM param in the Chord track */
  1047. DEFINE_GUID(GUID_ChordParam,0xd2ac289e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1048.  
  1049. /* Use to get a DMUS_RHYTHM_PARAM param in the Chord track */
  1050. DEFINE_GUID(GUID_RhythmParam,0xd2ac289f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1051.  
  1052. /* Use to get/set an IDirectMusicStyle param in the Style track */
  1053. DEFINE_GUID(GUID_IDirectMusicStyle,0xd2ac28a1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1054.  
  1055. /* Use to get a DMUS_TIMESIGNATURE param in the Style and TimeSig tracks */
  1056. DEFINE_GUID(GUID_TimeSignature,0xd2ac28a4, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1057.  
  1058. /* Use to get/set a DMUS_TEMPO_PARAM param in the Tempo track */
  1059. DEFINE_GUID(GUID_TempoParam,0xd2ac28a5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1060.  
  1061. /* Use to set an IDirectMusicBand param in the Band track */
  1062. DEFINE_GUID(GUID_IDirectMusicBand,0xd2ac28ac, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1063.  
  1064. /* Use to get/set an IDirectMusicChordMap param in the ChordMap track */
  1065. DEFINE_GUID(GUID_IDirectMusicChordMap,0xd2ac28ad, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1066.  
  1067. /* Use to get/set a DMUS_MUTE_PARAM param in the Mute track */
  1068. DEFINE_GUID(GUID_MuteParam,0xd2ac28af, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1069.  
  1070. /* These guids are used in IDirectMusicSegment::SetParam to tell the band track to perform various actions.
  1071.  */
  1072. /* Download bands for the IDirectMusicSegment */
  1073. DEFINE_GUID(GUID_Download,0xd2ac28a7, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1074.  
  1075. /* Unload bands for the IDirectMusicSegment */
  1076. DEFINE_GUID(GUID_Unload,0xd2ac28a8, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1077.  
  1078. /* Connect segment's bands to an IDirectMusicCollection */
  1079. DEFINE_GUID(GUID_ConnectToDLSCollection, 0x1db1ae6b, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e);
  1080.  
  1081. /* Enable/disable autodownloading of bands */
  1082. DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1083. DEFINE_GUID(GUID_Disable_Auto_Download,0xd2ac28aa, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1084.  
  1085. /* Clear all bands */
  1086. DEFINE_GUID(GUID_Clear_All_Bands,0xd2ac28ab, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1087.  
  1088. /* Set segment to manage all program changes, bank selects, etc. for simple playback of a standard MIDI file */
  1089. DEFINE_GUID(GUID_StandardMIDIFile, 0x6621075, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e);
  1090. /* For compatibility with beta releases... */
  1091. #define GUID_IgnoreBankSelectForGM     GUID_StandardMIDIFile
  1092.  
  1093. /* Disable/enable param guids. Use these in SetParam calls to disable or enable sending
  1094.  * specific PMsg types.
  1095.  */
  1096. DEFINE_GUID(GUID_DisableTimeSig, 0x45fc707b, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1097. DEFINE_GUID(GUID_EnableTimeSig, 0x45fc707c, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1098. DEFINE_GUID(GUID_DisableTempo, 0x45fc707d, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1099. DEFINE_GUID(GUID_EnableTempo, 0x45fc707e, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1100.  
  1101. /* Used in SetParam calls for pattern-based tracks.  A nonzero value seeds the random number 
  1102. generator for variation selection; a value of zero reverts to the default behavior of 
  1103. getting the seed from the system clock.
  1104. */
  1105. DEFINE_GUID(GUID_SeedVariations, 0x65b76fa5, 0xff37, 0x11d2, 0x81, 0x4e, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1106.  
  1107. /* Global data guids */
  1108. DEFINE_GUID(GUID_PerfMasterTempo,0xd2ac28b0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1109. DEFINE_GUID(GUID_PerfMasterVolume,0xd2ac28b1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1110. DEFINE_GUID(GUID_PerfMasterGrooveLevel,0xd2ac28b2, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1111. DEFINE_GUID(GUID_PerfAutoDownload, 0xfb09565b, 0x3631, 0x11d2, 0xbc, 0xb8, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1112.  
  1113. /* GUID for default GM/GS dls collection. */
  1114. DEFINE_GUID(GUID_DefaultGMCollection, 0xf17e8673, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1115.  
  1116. /* IID's */
  1117. DEFINE_GUID(IID_IDirectMusicLoader, 0x2ffaaca2, 0x5dca, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1118. DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844, 0xd13d, 0x11d1, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1119. DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1120. DEFINE_GUID(IID_IDirectMusicSegment, 0xf96029a2, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1121. DEFINE_GUID(IID_IDirectMusicSegmentState, 0xa3afdcc7, 0xd3ee, 0x11d1, 0xbc, 0x8d, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1122. DEFINE_GUID(IID_IDirectMusicTrack, 0xf96029a1, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1123. DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03, 0x6523, 0x11d2, 0x87, 0x1d, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1124. DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1125. DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277, 0x5497, 0x11d2, 0xbc, 0xcb, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1126. DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1127. DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1128. DEFINE_GUID(IID_IDirectMusicComposer,0xd2ac28bf, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1129. DEFINE_GUID(IID_IDirectMusicBand,0xd2ac28c0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1130.  
  1131. /* Alternate interface IDs, available in DX7 release and after. */
  1132. DEFINE_GUID(IID_IDirectMusicPerformance2,0x6fc2cae0, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1133. DEFINE_GUID(IID_IDirectMusicSegment2, 0xd38894d1, 0xc052, 0x11d2, 0x87, 0x2f, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1134.  
  1135. #ifdef __cplusplus
  1136. }; /* extern "C" */
  1137. #endif
  1138.  
  1139. #include <poppack.h>
  1140.  
  1141. #endif /* #ifndef _DMUSICI_ */
  1142.